<#include "header.htm"/>
<#import "../macros/pagination.ftl" as pagination>

<script type="text/javascript" src="${contextPath}/templates/${templateName}/js/pagination.js?${startupTime}"></script>
	<style type="text/css">@import url( ${contextPath}/templates/${templateName}/styles/custom.css?${startupTime} );</style>


<h2><a href="${JForumContext.encodeURL("/moderation/showActivityLog")}">${I18n.getMessage("ModerationLog.moderationLog")}</a></h2>

	<div class="pagination">
						<#assign paginationLinks>
							<@pagination.doPagination action/>
						</#assign>

						${paginationLinks}
   	</div>
   	
   	
   	

   	
   	
   	



		
			<table cellspacing="1" cellpadding="4">
				<tr>
					<th class="thtop" align="center">${I18n.getMessage("ModerationLog.date")}</th>

					<#if canAccessFullModerationLog>
						<th class="thtop" align="center" height="25">${I18n.getMessage("ModerationLog.moderator")}</th>
					</#if>
					<th class="thtop" align="center" height="25">${I18n.getMessage("ModerationLog.user")}</th>
					<th class="thtop" align="center">${I18n.getMessage("ModerationLog.type")}</th>
					<th class="thtop" align="center">${I18n.getMessage("ModerationLog.description")}</th>

					<#if canAccessFullModerationLog>
						<th class="thtop" align="center">${I18n.getMessage("ModerationLog.originalMessage")}</th>
					</#if>

					<th class="thtop" align="center">${I18n.getMessage("ModerationLog.action")}</th>
				</tr>

				<#list activityLog as log>
				<#if log_index % 2 == 0>
						<#assign rowColor = "bg2">
					<#else>
						<#assign rowColor = "bg1">
				</#if>
				<tr class="row ${rowColor}">
					<td class="row2" valign="top" align="center">${log.date?datetime}</td>

					<#if canAccessFullModerationLog>
						<td class="row1" valign="top" align="center" nowrap="nowrap">
							<a href="${JForumContext.encodeURL("/user/profile/${log.user.id}")}">${log.user.username}</a>
						</td>
					</#if>
					<td class="row1" valign="top" align="center" nowrap="nowrap">
						<#if log.posterUser.username?exists>
							<a href="${JForumContext.encodeURL("/user/profile/${log.posterUser.id}")}">${log.posterUser.username}</a>
						</#if>
					</td>
					<td class="row2" valign="top" align="center" nowrap="nowrap">
						<#if log.type == 0>
							${I18n.getMessage("ModerationLog.typeMoved")}
						<#elseif log.type == 1>
							${I18n.getMessage("ModerationLog.typeDeleted")}
						<#elseif log.type == 2>
							${I18n.getMessage("ModerationLog.typeEdited")}
						<#else>
							${I18n.getMessage("ModerationLog.typeLockUnlock")}
						</#if>
					</td>
					<td class="row1" valign="top">${log.description?html}</td>

					<#if canAccessFullModerationLog>
						<td class="row2" valign="top">${log.originalMessage?default("&nbsp;")}</td>
					</#if>

					<td class="row2 gensmall" valign="top" align="center" width="100">
						<#if log.topicId != 0>
							<a href="${JForumContext.encodeURL("/posts/list/${log.topicId}")}">${I18n.getMessage("ModerationLog.viewTopic")}</a><br>
						</#if>

						<#if log.postId != 0>
							<a href="${JForumContext.encodeURL("/posts/preList/${log.topicId}/${log.postId}")}">${I18n.getMessage("ModerationLog.viewMessage")}</a>
						</#if>
					</td>
				</tr>
				</#list>
			</table>  





   	
   	<div class="pagination">
		${paginationLinks}
   	</div>
<#include "bottom.htm"/>